﻿using System;
using System.Text;
using System.Drawing;
using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;

public static partial class glDRIVE
{
    /*
    不完全Gamma函数
    a：a自变量值。要求a>0。
    x：x自变量值。要求x>=0。
    函数返回不完全Gamma函数值。
    */

    public static string drive_ingamma()
    {
        int i, j;
        double y, s, t;
        double[] a = new double[3] { 0.5, 5.0, 50.0 };
        double[] x = new double[3] { 0.1, 1.0, 10.0 };
        StringBuilder sb = new StringBuilder();
        for (i = 0; i <= 2; i++)
        {
            for (j = 0; j <= 2; j++)
            {
                s = a[i]; t = x[j];
                y = gl.ingamma(s, t);
                sb.AppendLine("ingamma(" + a[i] + ", " + x[j] + ") = " + y + "<br>");
            }
        }
        return sb.ToString();
    }
}